package com.zjw.zy.utils;

import android.graphics.drawable.Drawable;

import androidx.annotation.ColorRes;
import androidx.annotation.DrawableRes;
import androidx.annotation.IntegerRes;
import androidx.annotation.StringRes;

import org.jetbrains.annotations.NotNull;

/**
 * @author ：zhong.jw
 * @date ：Created in 2022/9/26 17:03
 */
public final class ResourcesUtils {


    public static String getString(@StringRes int id) {
        return AppUtils.getApp().getResources().getString(id);
    }

    public static String getString(@StringRes int id, Object... args) {
        return AppUtils.getApp().getResources().getString(id, args);
    }

    public static int getInt(@IntegerRes int id) {
        return AppUtils.getApp().getResources().getInteger(id);
    }

    @NotNull
    public static Drawable getDrawable(@DrawableRes int id) {
        return AppUtils.getApp().getResources().getDrawable(id);
    }

    public static int getColor(@ColorRes int colorId) {
        return AppUtils.getApp().getColor(colorId);
    }
}
